<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>OrbbecSDK: ob::DeviceList类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="orbbec_icon.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">OrbbecSDK
   &#160;<span id="projectnumber">1.8.3</span>
   </div>
   <div id="projectbrief">OrbbecSDK: 奥比中光 3D 相机开发套件</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="pages.html"><span>相关页面</span></a></li>
      <li><a href="namespaces.html"><span>命名空间</span></a></li>
      <li class="current"><a href="annotated.html"><span>类</span></a></li>
      <li><a href="files.html"><span>文件</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>类列表</span></a></li>
      <li><a href="classes.html"><span>类索引</span></a></li>
      <li><a href="hierarchy.html"><span>类继承关系</span></a></li>
      <li><a href="functions.html"><span>类成员</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceob.html">ob</a></li><li class="navelem"><a class="el" href="classob_1_1DeviceList.html">DeviceList</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="classob_1_1DeviceList-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">ob::DeviceList类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>表示设备列表的类  
 <a href="classob_1_1DeviceList.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="Device_8hpp_source.html">Device.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a78325a6d57af6744915cb4dd75e295ab"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classob_1_1DeviceList.html#a78325a6d57af6744915cb4dd75e295ab">DeviceList</a> (std::unique_ptr&lt; DeviceListImpl &gt; impl)</td></tr>
<tr class="separator:a78325a6d57af6744915cb4dd75e295ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf75efa477ec41362f32497404b8b667"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classob_1_1DeviceList.html#aaf75efa477ec41362f32497404b8b667">~DeviceList</a> () noexcept</td></tr>
<tr class="separator:aaf75efa477ec41362f32497404b8b667"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada4e95ac534b1d072cba42f5a492c97b"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classob_1_1DeviceList.html#ada4e95ac534b1d072cba42f5a492c97b">deviceCount</a> ()</td></tr>
<tr class="memdesc:ada4e95ac534b1d072cba42f5a492c97b"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取设备数量  <a href="#ada4e95ac534b1d072cba42f5a492c97b">更多...</a><br /></td></tr>
<tr class="separator:ada4e95ac534b1d072cba42f5a492c97b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad8e995e429946eccd954315b354107dd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ObTypes_8h.html#ac1e8a42306d8e67cb94ca31c3956ee78">DEPRECATED</a> const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classob_1_1DeviceList.html#ad8e995e429946eccd954315b354107dd">name</a> (uint32_t index)</td></tr>
<tr class="memdesc:ad8e995e429946eccd954315b354107dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取指定设备的名称 (废弃接口)  <a href="#ad8e995e429946eccd954315b354107dd">更多...</a><br /></td></tr>
<tr class="separator:ad8e995e429946eccd954315b354107dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a5c22a6107d48d498f3a64bdc8391c5"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classob_1_1DeviceList.html#a5a5c22a6107d48d498f3a64bdc8391c5">pid</a> (uint32_t index)</td></tr>
<tr class="memdesc:a5a5c22a6107d48d498f3a64bdc8391c5"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取指定设备的 pid  <a href="#a5a5c22a6107d48d498f3a64bdc8391c5">更多...</a><br /></td></tr>
<tr class="separator:a5a5c22a6107d48d498f3a64bdc8391c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a74f6a148c7b47321f4fae8d1f558fa45"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classob_1_1DeviceList.html#a74f6a148c7b47321f4fae8d1f558fa45">vid</a> (uint32_t index)</td></tr>
<tr class="memdesc:a74f6a148c7b47321f4fae8d1f558fa45"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取指定设备的 vid  <a href="#a74f6a148c7b47321f4fae8d1f558fa45">更多...</a><br /></td></tr>
<tr class="separator:a74f6a148c7b47321f4fae8d1f558fa45"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac0c1f95a7750bd639d9412c59225c6b9"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classob_1_1DeviceList.html#ac0c1f95a7750bd639d9412c59225c6b9">uid</a> (uint32_t index)</td></tr>
<tr class="memdesc:ac0c1f95a7750bd639d9412c59225c6b9"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取指定设备的 uid  <a href="#ac0c1f95a7750bd639d9412c59225c6b9">更多...</a><br /></td></tr>
<tr class="separator:ac0c1f95a7750bd639d9412c59225c6b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a97e93ca3bb8e7e55f74c7d14308a1454"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classob_1_1DeviceList.html#a97e93ca3bb8e7e55f74c7d14308a1454">serialNumber</a> (uint32_t index)</td></tr>
<tr class="memdesc:a97e93ca3bb8e7e55f74c7d14308a1454"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取指定设备的序列号  <a href="#a97e93ca3bb8e7e55f74c7d14308a1454">更多...</a><br /></td></tr>
<tr class="separator:a97e93ca3bb8e7e55f74c7d14308a1454"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abcda8ac394c628d717348061c3a8b3c6"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classob_1_1DeviceList.html#abcda8ac394c628d717348061c3a8b3c6">connectionType</a> (uint32_t index)</td></tr>
<tr class="memdesc:abcda8ac394c628d717348061c3a8b3c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取设备连接类型  <a href="#abcda8ac394c628d717348061c3a8b3c6">更多...</a><br /></td></tr>
<tr class="separator:abcda8ac394c628d717348061c3a8b3c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae94682c089d204359c5928919d08b374"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classob_1_1DeviceList.html#ae94682c089d204359c5928919d08b374">ipAddress</a> (uint32_t index)</td></tr>
<tr class="memdesc:ae94682c089d204359c5928919d08b374"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取指定索引处设备的 IP 地址  <a href="#ae94682c089d204359c5928919d08b374">更多...</a><br /></td></tr>
<tr class="separator:ae94682c089d204359c5928919d08b374"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:add9a199b3795a76b0244d9c0a59f762e"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="classob_1_1Device.html">Device</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classob_1_1DeviceList.html#add9a199b3795a76b0244d9c0a59f762e">getDevice</a> (uint32_t index)</td></tr>
<tr class="memdesc:add9a199b3795a76b0244d9c0a59f762e"><td class="mdescLeft">&#160;</td><td class="mdescRight">从设备列表中获取指定设备对象,  <a href="#add9a199b3795a76b0244d9c0a59f762e">更多...</a><br /></td></tr>
<tr class="separator:add9a199b3795a76b0244d9c0a59f762e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af5bd74946c5d7bc1066dc9fb0df974b7"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="classob_1_1Device.html">Device</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classob_1_1DeviceList.html#af5bd74946c5d7bc1066dc9fb0df974b7">getDeviceBySN</a> (const char *<a class="el" href="classob_1_1DeviceList.html#a97e93ca3bb8e7e55f74c7d14308a1454">serialNumber</a>)</td></tr>
<tr class="memdesc:af5bd74946c5d7bc1066dc9fb0df974b7"><td class="mdescLeft">&#160;</td><td class="mdescRight">从设备列表中获取指定设备对象  <a href="#af5bd74946c5d7bc1066dc9fb0df974b7">更多...</a><br /></td></tr>
<tr class="separator:af5bd74946c5d7bc1066dc9fb0df974b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a25a2b41118b2a3deea407ea780d67c47"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="classob_1_1Device.html">Device</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classob_1_1DeviceList.html#a25a2b41118b2a3deea407ea780d67c47">getDeviceByUid</a> (const char *<a class="el" href="classob_1_1DeviceList.html#ac0c1f95a7750bd639d9412c59225c6b9">uid</a>)</td></tr>
<tr class="memdesc:a25a2b41118b2a3deea407ea780d67c47"><td class="mdescLeft">&#160;</td><td class="mdescRight">从设备列表中获取指定设备对象  <a href="#a25a2b41118b2a3deea407ea780d67c47">更多...</a><br /></td></tr>
<tr class="separator:a25a2b41118b2a3deea407ea780d67c47"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>表示设备列表的类 </p>

<p>在文件 <a class="el" href="Device_8hpp_source.html">Device.hpp</a> 第 <a class="el" href="Device_8hpp_source.html#l00647">647</a> 行定义.</p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a class="anchor" id="a78325a6d57af6744915cb4dd75e295ab"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ob::DeviceList::DeviceList </td>
          <td>(</td>
          <td class="paramtype">std::unique_ptr&lt; DeviceListImpl &gt;&#160;</td>
          <td class="paramname"><em>impl</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="aaf75efa477ec41362f32497404b8b667"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">ob::DeviceList::~DeviceList </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a class="anchor" id="ada4e95ac534b1d072cba42f5a492c97b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ob::DeviceList::deviceCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取设备数量 </p>
<dl class="section return"><dt>返回</dt><dd>uint32_t 返回设备的数量 </dd></dl>

</div>
</div>
<a class="anchor" id="ad8e995e429946eccd954315b354107dd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ObTypes_8h.html#ac1e8a42306d8e67cb94ca31c3956ee78">DEPRECATED</a> const char* ob::DeviceList::name </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取指定设备的名称 (废弃接口) </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">index</td><td>设备索引 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>int 返回设备的名称 </dd></dl>

</div>
</div>
<a class="anchor" id="a5a5c22a6107d48d498f3a64bdc8391c5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ob::DeviceList::pid </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取指定设备的 pid </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">index</td><td>设备索引 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>int 返回设备的 pid </dd></dl>

</div>
</div>
<a class="anchor" id="a74f6a148c7b47321f4fae8d1f558fa45"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ob::DeviceList::vid </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取指定设备的 vid </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">index</td><td>设备索引 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>int 返回设备的 vid </dd></dl>

</div>
</div>
<a class="anchor" id="ac0c1f95a7750bd639d9412c59225c6b9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* ob::DeviceList::uid </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取指定设备的 uid </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">index</td><td>设备索引 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>const char * 返回设备的 uid </dd></dl>

</div>
</div>
<a class="anchor" id="a97e93ca3bb8e7e55f74c7d14308a1454"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* ob::DeviceList::serialNumber </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取指定设备的序列号 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">index</td><td>设备索引 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>const char * 返回设备的序列号 </dd></dl>

</div>
</div>
<a class="anchor" id="abcda8ac394c628d717348061c3a8b3c6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* ob::DeviceList::connectionType </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取设备连接类型 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">index</td><td>设备索引 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>const char* 返回连接类型，当前支持的类型有："USB", "USB1.0", "USB1.1", "USB2.0", "USB2.1", "USB3.0", "USB3.1", "USB3.2", "Ethernet" </dd></dl>

</div>
</div>
<a class="anchor" id="ae94682c089d204359c5928919d08b374"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* ob::DeviceList::ipAddress </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取指定索引处设备的 IP 地址 </p>
<dl class="section attention"><dt>注意</dt><dd>仅适用于网络设备，否则将返回 "0.0.0.0"</dd></dl>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">index</td><td>设备索引 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>const char* 设备的 IP 地址，例如：“192.168.1.10” </dd></dl>

</div>
</div>
<a class="anchor" id="add9a199b3795a76b0244d9c0a59f762e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt;<a class="el" href="classob_1_1Device.html">Device</a>&gt; ob::DeviceList::getDevice </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>从设备列表中获取指定设备对象, </p>
<dl class="section attention"><dt>注意</dt><dd>如果设备有在其他地方被获取创建，重复获取将会抛异常 </dd></dl>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">index</td><td>要创建设备的索引 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>std::shared_ptr&lt;Device&gt; 返回设备对象 </dd></dl>

</div>
</div>
<a class="anchor" id="af5bd74946c5d7bc1066dc9fb0df974b7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt;<a class="el" href="classob_1_1Device.html">Device</a>&gt; ob::DeviceList::getDeviceBySN </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>serialNumber</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>从设备列表中获取指定设备对象 </p>
<dl class="section attention"><dt>注意</dt><dd>如果设备有在其他地方被获取创建，重复获取将会抛异常 </dd></dl>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">serialNumber</td><td>要创建设备的序列号 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>std::shared_ptr&lt;Device&gt; 返回设备对象 </dd></dl>

</div>
</div>
<a class="anchor" id="a25a2b41118b2a3deea407ea780d67c47"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt;<a class="el" href="classob_1_1Device.html">Device</a>&gt; ob::DeviceList::getDeviceByUid </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>uid</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>从设备列表中获取指定设备对象 </p>
<p>在 Linux 平台，设备的 uid 由 bus-port-dev 组成，例如 1-1.2-1。但是 SDK 内部会去掉 dev 号只保留 bus-port 当作 uid 来创建设备，例如 1-1.2，这样我们就可以创建一个连接到指定 USB 端口的设备。相应地，用户也可以直接传入 bus-port 当作 uid 来创建设备。 </p><dl class="section attention"><dt>注意</dt><dd>如果设备有在其他地方被获取创建，重复获取将会抛异常 </dd></dl>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">uid</td><td>要创建设备的 uid </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>std::shared_ptr&lt;Device&gt; 返回设备对象 </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>header_cn/libobsensor/hpp/<a class="el" href="Device_8hpp_source.html">Device.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2023年 十一月 24日 星期五 10:56:17 , 为 OrbbecSDK使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
